# 定义2个变量
# EXTRA_COMPONENT_HW_SUPP_DIRS 引用了 hw_support 驱动
# EXTRA_COMPONENT_GPIO_DIRS 引用了 GPIO 驱动
# EXTRA_COMPONENT_MCPWM_DIRS 引用了 mcpwm 驱动
set(EXTRA_COMPONENT_GPIO_DIRS "${IDF_PATH}/components/esp_driver_gpio/include")
#set(EXTRA_COMPONENT_HW_SUPP_DIRS "${IDF_PATH}/components/esp_hw_support/include")
#set(EXTRA_COMPONENT_MCPWM_DIRS "${IDF_PATH}/components/esp_driver_mcpwm/include")


message(STATUS "EXTRA_COMPONENT_GPIO_DIRS = ${EXTRA_COMPONENT_GPIO_DIRS}")
#message(STATUS "EXTRA_COMPONENT_HW_SUPP_DIRS = ${EXTRA_COMPONENT_HW_SUPP_DIRS}")
#message(STATUS "EXTRA_COMPONENT_MCPWM_DIRS = ${EXTRA_COMPONENT_MCPWM_DIRS}")


# 找找头文件目录
#E:\Espressif\frameworks\esp-idf-v5.3\components\esp_hw_support\include\esp_private\esp_clk.h
#E:\Espressif\frameworks\esp-idf-v5.3\components\esp_driver_mcpwm\include\driver

# 增加源文件 和 包含的目录
idf_component_register(SRCS "task_pwm_capture.c"
                        INCLUDE_DIRS "." 
                        INCLUDE_DIRS "../../main/xlx_code/inc"
                            ${EXTRA_COMPONENT_GPIO_DIRS}
                            #${EXTRA_COMPONENT_HW_SUPP_DIRS}
                            #${EXTRA_COMPONENT_MCPWM_DIRS}
                       )

#[[
idf_component_register(SRCS "task_pwm_capture.c"
                    INCLUDE_DIRS ".")
]]
